package com.dmgis.qxfw.dataservice.businessservice.common.util;

import com.github.kevinsawicki.http.HttpRequest;

import java.util.Map;

public class HttpRequestUtil {
	public String sendGet(String url,Map<String ,String> param){
		String result = "";
		HttpRequest httpRequest = HttpRequest.get(url).trustAllCerts().trustAllHosts().
				form(param).connectTimeout(60000).readTimeout(60000);
		result = httpRequest.body();
		return result;
	}

	public String sendPost(String url,Map<String ,String> param){
		String result = "";
		HttpRequest httpRequest = HttpRequest.post(url).trustAllCerts().trustAllHosts().
				form(param).connectTimeout(60000).readTimeout(60000);
		result = httpRequest.body();
		return result;
	}
}
